package com.easy.reconciliation.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Packge com.easy.reconciliation.controller
 * @Autor linNaibin
 * @Description
 * @Version 1.0
 * @Date 2021/11/18 11:42
 */
@RestController
public class IndexController {
    private static final Logger logger = LoggerFactory.getLogger(IndexController.class);

    @RequestMapping("/")
    public ModelAndView home() {
        ModelAndView modelAndView = new ModelAndView();
        logger.info("欢迎进入主页");
        modelAndView.setViewName("index");
        return modelAndView;
    }

    @RequestMapping("/index")
    public ModelAndView index() {
        return home();
    }
}
